home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
program
/
gcc
/
libmat.lha
/
src
/
meig.cc
< prev
next >
Wrap
C/C++ Source or Header
|
1980-01-01
|
327b
|
22 lines
// MATRIX LIB
// TOMMY JOHANSSON 1995
#include "matrix.h"
Matrix eigen(const Matrix & A)
{
Matrix C(A);
Matrix L(A.m);
Matrix R(A.m);
Matrix temp(A.m,1);
int i,ch=A.m;
while(ch>1)
{
if(fabs(C.koff[ch][1])<EPS) ch--;
LR(C,L,R);
C=R*L;
}
for(i=1;i<=A.m;i++)
temp.koff[i][1]=C.koff[i][i];
return(temp);
}